// chatServer2Dlg.h : header file
//

#if !defined(AFX_CHATSERVER2DLG_H__BE41D0A5_1CE8_4CC8_8317_20137B7B9E75__INCLUDED_)
#define AFX_CHATSERVER2DLG_H__BE41D0A5_1CE8_4CC8_8317_20137B7B9E75__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CChatServer2Dlg dialog

class CChatServer2Dlg : public CDialog
{
// Construction
public:
	CChatServer2Dlg(CWnd* pParent = NULL);	// standard constructor
	void oncl();
	void onac();
	void onrev();

// Dialog Data
	//{{AFX_DATA(CChatServer2Dlg)
	enum { IDD = IDD_CHATSERVER2_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CChatServer2Dlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CChatServer2Dlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnListen();
	afx_msg void OnSend();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

class csocket : public CSocket
{
public:
	void OnReceive(int n_error)
	{
		dlg->onrev();
	}
	void OnAccept(int n_error)
	{
		dlg->onac();
	}
	void OnClose(int n_error)
	{
		dlg->oncl();
	}
	void setp(CChatServer2Dlg *serverdlg)
	{
		dlg = serverdlg;
	}
private:
	CChatServer2Dlg *dlg;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CHATSERVER2DLG_H__BE41D0A5_1CE8_4CC8_8317_20137B7B9E75__INCLUDED_)
